﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CRC.Comun.Presentacion
{
    public partial class FormCategoria : Form
    {
        public FormCategoria()
        {
            InitializeComponent();
        }

        public FormCategoria(String pStrTit) : this ()
        {
            this.Text = pStrTit;
        }

        private void butKO_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void butOK_Click(object sender, EventArgs e)
        {
            if (txtCateg.Text.Trim().Length != 0)
            {
                this.Close();
            }
            else
            {
                MessageBox.Show("El nombre es obligatorio", "Advertencia",
                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
    }
}
